<!--
 * @Description: 事件类型-窗口
 * @Author: zzj
 * @Date: 2021-09-14 12:04:53
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-15 09:31:13
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件类型</title>
    <script>
        window.onload = function(){
            var a1 = document.getElementById("a1");
            console.log(a1);
        }
        window.onload = function(){
            console.log(11111);
        }
        window.onresize = function(){
            console.log("窗口被改变了");
        }
        window.onscroll = function(){
            console.log("窗口被拖动了！")
        }
    </script>
</head>
<body>
    <div id="a1" style="height: 2000px;"></div>
</body>
</html>